// 
import request from '@/utils/request'

// 测试工号是否已经存在
export function testWorkNum(params) {
    return request({
        url: '/back/user/checkUser',
        method: 'post',
        params
    })
}

// 修改用户信息函数
export function modifyWorkers(data) {
    return request({
      data,
      url: '/back/user/updateUser',
      method: 'post'
    })
  }


export function getList(params) {
    return request({
        url: '/back/manager/getList',
        method: 'get',
        params
    })
}

//新增员工信息
export function addWorker(data) {
    return request({
        url: '/back/user/saveUser',
        method: 'post',
        data
    })
}

// 调用角色信息表单
export function getRoleList(data) {
    return request({
        url: '/back/role/roleList',
        method: 'get',
        data
    })
}

// 调用部门信息表单
export function getDepartList(data) {
    return request({
        url: '/back/departmentClass/getDepartmentList',
        method: 'get',
        data
    })
}

//修改管理员名称
export function updateManager(data) {
    return request({
        url: '/back/manager/updateManager',
        method: 'put',
        data
    })
}
//修改代理商状态
export function updateIsFlag(data) {
    return request({
        url: '/back/manager/updateIsFlag',
        method: 'post',
        data
    })
}
// 重置密码
export function updatePassword(data) {
    return request({
        url: '/back/manager/updatePassword',
        method: 'post',
        data
    })
}
// 获取部门
export function getDepartment(data) {
    return request({
        url: '/departmentClass/getDepartmentList',
        method: 'post',
        data: {...data}
    })
}

